<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>文字颜色智能适配背景</title>

    <style>
         body{
             padding: 0;
             margin: 0;
         }

         .text{
             position: relative;
             z-index: 111;
             color: rgb(112, 40, 40);
             mix-blend-mode: multiply;
             font-size: 70px;
             font-weight: bold;
             text-align: center;
             padding-top: 20%;
         }
        </style>
</head>
<body>
<!--
使用css属性，mix-blend-mode:difference; 当文字颜色为白色，例如255,255,255,那么就会和背景颜色相减，得到新的文字颜色
-->
<img src="./assets/1.png" alt="" style="width: 100%;height: 100%;position: absolute">
<div class="text">
asdfsadf
</div>
</body>
</html>